//package org.vy.dal.dao;
//
//import java.util.List;
//
//import org.vy.dal.QueryManager;
//
//public class ViewVyPrintLabelGroupDAO {
//
//	private static final String FIND_BY_GROUP_ID = "SELECT * FROM <TABLE> WHERE GROUP_ID = m_GroupId";
//	private static final String FIND_BY_VYID = "SELECT * FROM <TABLE> WHERE VY_ID = m_VyId";
//	private static final String FIND_BY_VYID_IN = "SELECT * FROM <TABLE> WHERE VY_ID IN (<PARAM>)";
//	private static final String FIND_BY_SUBSCRIPTION_ID = "SELECT * FROM <TABLE> WHERE SUBSCRIPTION_ID IN (<PARAM>)";
//	private static final String FIND_BY_GROUP_VY_ID = "SELECT * FROM <TABLE> WHERE VY_ID = m_VyId AND GROUP_ID = m_GroupId";
//
//	public static ViewVyPrintLabelGroupDO findByPK(String groupId, String vyId) throws Exception {
//		ViewVyPrintLabelGroupDO dto = new ViewVyPrintLabelGroupDO();
//		dto.setGroupId(groupId);
//		dto.setVyId(vyId);
//		dto = (ViewVyPrintLabelGroupDO) QueryManager.executeQuery(dto,
//				FIND_BY_GROUP_VY_ID);
//		return dto;
//	}
//
//	@SuppressWarnings("unchecked")
//	public static List<ViewVyPrintLabelGroupDO> findByVyId(String vyId)
//			throws Exception {
//		ViewVyPrintLabelGroupDO dto = new ViewVyPrintLabelGroupDO();
//		dto.setVyId(vyId);
//		return (List<ViewVyPrintLabelGroupDO>) QueryManager.executeListQuery(dto,
//				FIND_BY_VYID);
//	}
//
//	@SuppressWarnings("unchecked")
//	public static List<ViewVyPrintLabelGroupDO> findBySubscriptionId(String vyId)
//			throws Exception {
//		ViewVyPrintLabelGroupDO dto = new ViewVyPrintLabelGroupDO();
//		dto.set(vyId);
//		return (List<ViewVyPrintLabelGroupDO>) QueryManager.executeListQuery(dto,
//				FIND_BY_VYID);
//	}
//
//	@SuppressWarnings("unchecked")
//	public static List<ViewVyPrintLabelGroupDO> findByVyIdList(String[] vyIds)
//			throws Exception {
//		StringBuilder ids = new StringBuilder(); 
//		ViewVyPrintLabelGroupDO dto = new ViewVyPrintLabelGroupDO();
//		for(String id : vyIds){
//			ids.append("'").append(id).append("',");
//		}
//		String sql = FIND_BY_VYID_IN.replaceAll("<PARAM>", ids.substring(0, ids.length()-1));
//		return (List<ViewVyPrintLabelGroupDO>) QueryManager.executeListQuery(dto, sql);
//	}
//
//	@SuppressWarnings("unchecked")
//	public static List<ViewVyPrintLabelGroupDO> findByGroupId(String groupId)
//			throws Exception {
//		ViewVyPrintLabelGroupDO dto = new ViewVyPrintLabelGroupDO();
//		dto.setGroupId(groupId);
//		return (List<ViewVyPrintLabelGroupDO>) QueryManager.executeListQuery(dto,
//				FIND_BY_GROUP_ID);
//	}
//}
